ÿþ--[[ x: JX-300-01 Tðy: WCS->WMS ûN¡RgbLˆåw \O€ÿHAN åegÿ2025-1-29 §~+Rÿy˜îv ýQpeÿ TaskNotification WCS ُ¹„v“eQÂSpe { "requestPk": "pk2022120614242376", "contNo": "60001", "noticeType": "02", "curPos": "2F_OUT_ST21", "code": 0, "equName":"¾‹Y Tðy" "equNo":"¾‹Y÷S" "result": "success", "clientCode": "wcs", "reqTime": "2022-11-11 11:32:08" } ŸRý€: -- WCS ŠbûN¡R„vgbLˆÅ`µQ¨cÙ~ WMS ôf9e°‹U_: --]] wms_task = require( "wms_task" ) wms_op = require( "wms_operation" ) function TaskNotification ( strLuaDEID ) local nRet, strRetInfo local body -- ·ƒÖS¥cãS OeQ„vpenc nRet, body = m3.GetSysDataJson(strLuaDEID) if ( nRet ~= 0 ) then lua.Debug( strLuaDEID, debug.getinfo(1), "¥cãS“eQÂSpe NTÕl", body ) mobox.stopProgram( strLuaDEID, "“eQÂSpe„vè]f¶r`ÞV¥b", trigger_event = "è]f¶r`ÞV¥b" } nRet, strRetInfo = m3.AddSysWFP( strLuaDEID, add_wfp ) if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "AddSysWFP1Y%!"..strRetInfo ) end end elseif ( noticeType == "2" ) then lua.Warning( strLuaDEID, debug.getinfo(1), "ûN¡R÷S'"..task_code.."'¡lgbLˆ1\¨cûN¡RŒ[b" ) end elseif ( task.bs_state == 2 ) then -- "2" ûN¡RŒ[b if ( noticeType == "2" ) then -- ¾‹nûN¡RŒ[b nRet, strRetInfo = wms.wms_TaskFinish( strLuaDEID, task_code ) if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "ûN¡Rx='"..task.code.."'„vûN¡R¾‹nŒ[b1Y%!"..strRetInfo ) end local task_action = m3.AllocObject(strLuaDEID,"Task_Action") task_action.task_code = task_code task_action.action_code = lua.StrToNumber( noticeType ) task_action.action = "ûN¡RŒ[b" task_action.eq_code = "XXX" task_action.eq_type_name = "XXX" nRet, strRetInfo = m3.CreateDataObj( strLuaDEID, task_action ) if ( nRet ~= 0 ) then mobox.stopProgram( strLuaDEID, "ûN¡R÷S'"..task_code.."'Rú^ûN¡R;m¨R°‹U_1Y%!" ) return end end end -- ¾‹nԏÞVÓ~œg local result = { code = 0, msg = "success", requestPk = body.requestPk } m3.EPI_Return( strLuaDEID, result ) end